package com.zhou.framework.aop.enums;

public enum LogLevel {

    OFF(0,"不记录任何日志"),

    ERROR(-1,"异常"),
    LOGIN(1,"登录"),
    LOGOUT(2,"登出"),
    PASSWORD(3,"修改密码"),

    FILE(4,"文件操作"),

    QUERY(5,"普通查询"),

    EDIT(6,"修改数据"),

    MESSAGE(7,"消息"),
    WORKFLOW(8,"流程"),

    DELETE(9,"删除数据"),

    SYSTEM(10,"修改系统配置"),
    QUARTZ(11,"执行定时任务"),

    GRANT(12,"修改权限"),
    EXPORT(13,"导出文件"),

    EXAM(14,"考试"),

    SERIOUS(14,"重要操作"),

    ALL(100,"全部记录");

    public int getValue() {
        return value;
    }
    public String getName() {
        return name;
    }

    public void setValue(int value) {
        this.value = value;
    }
    public void setName(String name) {
        this.name = name;
    }

    public int value;
    public String name;

    LogLevel(int level, String name){
        this.value = level;
        this.name = name;
    }
    /**
     * 获取默认日志记录级别
     */
    public LogLevel defaultValue(){
        return LogLevel.ALL;
    }
    public int get(){
        return this.value;
    }
}
